{% extends "index.html" %}

{% block sidebar %}
	<h3>Story Player</h3>
	<div class="sb1">
	<div>Experience your story here, or on the iPhone.
		<br><a href="http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=303634203&mt=8">Buy iStory from the App Store</a></div>
	<div>When your story is ready for public viewing, submit it for approval.</div>
	<div>You can also share this story with people you invite so they can view it before it's approved!</div>
	<div><script type="text/javascript"><!--
	google_ad_client = "pub-8635596764254051";
	/* 234x60, created 2/3/09 graphite */
	google_ad_slot = "1443998776";
	google_ad_width = 234;
	google_ad_height = 60;
	//-->
	</script>
	<script type="text/javascript"
	src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
	</script></div>
	</div>
	<br>
	<hr>
	<br>
	<div class="sb1">
	<div class="voting">
		<table>
			<tr><td colspan="5" id="voted">Do you like this story? Rate it!</td>
			<tr></tr>
				<td class="star" id="star1"><span class="icon-starEmpty"></span></td>
				<td class="star" id="star2"><span class="icon-starEmpty"></span></td>
				<td class="star" id="star3"><span class="icon-starEmpty"></span></td>
				<td class="star" id="star4"><span class="icon-starEmpty"></span></td>
				<td class="star" id="star5"><span class="icon-starEmpty"></span></td>
			</tr><tr><td colspan="5">Comment (optional):<br><form id="voteForm" action="/vote" method="POST">
				<textarea id="voteComment" name="comment" rows="5" cols="25"></textarea><br>
			</tr><tr><td colspan="5"><input type="submit" value="Vote!">
				<input type="hidden" name="myAdventureKey" value="{{ adventure.key }}">
				<input type="hidden" name="vote" id="voteValue" value="-1">
				</form>
			</tr><tr><td colspan="5" id="voteBottom">
		</tr></table>
	</div></div>
{% endblock %}

{% block main %}
	<div>
	<div id="loadTop"><img src="/stylesheets/loadBig3.gif"></div>
	<table class="mainContentHeader"><tr>
		<th style="text-align:right;">"{{ adventure.title|escape }}"</th>
	</tr><tr>
		<th width="50%" style="text-align:right;">{{ adventure.author|escape }}</th>
	</tr></table>
	<table class="mainContentHeader"><tr>
		<td class="iconBG-disabled" id="restartStory"><div id="icon-restart" class="icon-restartD"></div>Restart Story</td>
		<td class="iconBG-disabled" id="storyForge"><div id="icon-storyEdit" class="icon-storyEditD"></div>StoryForge</td>
		<td class="iconBG-disabled" id="shareStory"><div id="icon-share" class="icon-shareD"></div>Share Story</td>
		<td class="iconBG-disabled" id="submitStory"><div id="icon-submit" class="icon-submitD"></div>Submit Story</td>
	</tr></table>
	</div>
	<div style="height:100%;">
		<a name="top"></a>
		<div id="player"><h1>Loading...</h1></div>
	</div>
	<div id="g" class="g">
	<script type="text/javascript"><!--
	google_ad_client = "pub-8635596764254051";
	/* 234x60, created 2/3/09 */
	google_ad_slot = "3880718539";
	google_ad_width = 234;
	google_ad_height = 60;
	//-->
	</script>
	<script type="text/javascript"
	src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
	</script>
	</div>
{% endblock %}


{% block footer %}
<!-- Combo-handled YUI JS files: -->
<script type="text/javascript" src="http://yui.yahooapis.com/combo?2.6.0/build/utilities/utilities.js&2.6.0/build/container/container-min.js&2.6.0/build/resize/resize-min.js&2.6.0/build/imagecropper/imagecropper-beta-min.js&2.6.0/build/json/json-min.js&2.6.0/build/treeview/treeview-min.js"></script>

<script type="text/javascript">
var MY_ADVENTURE_KEY = '';
{% if adventure.key %}	MY_ADVENTURE_KEY = "{{ adventure.key }}";{% endif %}
var MY_ERROR = '';
{% if error %} MY_ERROR = "{{ error|escape }}"; {% endif %}
var IS_USER_ADMIN = {{ isUserAdmin|lower }};
var IS_USER_AUTHOR = {{ isUserAuthor|lower }};
var MY_VOTE = null;
{% if userVote.vote %}MY_VOTE = {{ userVote.vote }};{% endif %}
var MY_VOTE_COMMENT = null;
{% if userVote.comment %}MY_VOTE_COMMENT = '{{ userVote.comment|escape }}';{% endif %}
</script>
<script src="/stylesheets/playStory.js"></script>
{% endblock %}

{% block index %}
{% endblock %}
